public class Employee {
    private String employeeName;
    private int employeeNumber;

    // 类变量
    private static String companyName = "小熊电竞公司";
    private static int employeeCount = 0;

    // 自定义静态代码块
    static {
        System.out.println("欢迎来到" + companyName);
    }

    // 无参构造方法
    public Employee() {
        employeeCount++;
    }

    // 含有姓名、员工号的构造方法
    public Employee(String name, int number) {
        this.employeeName = name;
        this.employeeNumber = number;
        employeeCount++;
    }

    // 打印员工信息的方法
    public void printEmployeeInfo() {
        System.out.println("员工姓名: " + employeeName);
        System.out.println("员工号: " + employeeNumber);
        System.out.println("所属单位: " + getCompanyName()); // 调用静态方法
    }

    // 静态方法，获取所属单位名称
    public static String getCompanyName() {
        return companyName;
    }

    // 静态方法，获取员工总数量
    public static int getEmployeeCount() {
        return employeeCount;
    }
}
